
package rendi456.geom;


public class Oval
{
	private int x;
	private int y;
	private int radius;

	private int left;
	private int right;
	private int top;
	private int bottom;
	private int diam;

	public Oval()
	{
		this(0, 0, 1);
	}

	public Oval(int x, int y, int radius)
	{
		this.x = x;
		this.y = y;
		this.radius = radius;


		this.update();
	}

	public int getX()
	{
		return this.x;
	}

	public int getY()
	{
		return this.y;
	}
	
	private void update()
	{
		this.diam = this.radius * 2;
		this.left = this.x - this.radius;
		this.right = this.x + this.radius;
		this.top = this.y - this.radius;
		this.bottom = this.y + this.radius;
	}

	public int getLeft()
	{
		return this.left;
	}

	public int getRight()
	{
		return this.right;
	}

	public int getTop()
	{
		return this.top;
	}

	public int getBottom()
	{
		return this.bottom;
	}

	public int getRadius()
	{
		return this.radius;
	}

	public int getDiam()
	{
		return this.diam;
	}
}
